Skip to content

chore: Convert SentrySessionReplayIntegration to Swift#7102

Merged
itaybre merged 29 commits intomainfrom
itay/cocoa-996-refactor-sentrysessionreplayintegrationm-in-swift
Jan 23, 2026
Merged

chore: Convert SentrySessionReplayIntegration to Swift#7102
itaybre merged 29 commits intomainfrom
itay/cocoa-996-refactor-sentrysessionreplayintegrationm-in-swift

Conversation

@itaybre
Copy link
Contributor

@itaybre itaybre commented Dec 29, 2025

📜 Description

Converts SentrySessionReplayIntegration to Swift.
Took the chance to remove some logic from SentrySessionReplayIntegration to other classes

💡 Motivation and Context

Work to deprecate SentryDependencyContainer and lower the amount of code in ObjC

💚 How did you test it?

Ran the demo APP

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

Closes #7105

@linear
Copy link

linear bot commented Dec 29, 2025

@itaybre itaybre added the ready-to-merge Use this label to trigger all PR workflows label Dec 29, 2025
@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

❌ Patch coverage is 90.90909% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.036%. Comparing base (7714225) to head (24e2fa5).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...SessionReplay/SentrySessionReplayIntegration.swift 89.743% 24 Missing ⚠️
...tions/SessionReplay/SessionReplayFileManager.swift 90.476% 10 Missing ⚠️
...grations/SessionReplay/SessionReplayRecovery.swift 91.150% 10 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #7102       +/-   ##
=============================================
+ Coverage   85.015%   85.036%   +0.020%     
=============================================
  Files          467       469        +2     
  Lines        28330     28356       +26     
  Branches     12493     12461       -32     
=============================================
+ Hits         24085     24113       +28     
  Misses        4196      4196               
+ Partials        49        47        -2     
Files with missing lines Coverage Δ
...ntryTestUtils/Sources/TestDisplayLinkWrapper.swift 89.041% <ø> (ø)
SentryTestUtils/Sources/TestHub.swift 85.714% <100.000%> (ø)
Sources/Sentry/PrivateSentrySDKOnly.m 73.333% <ø> (ø)
Sources/Sentry/SentryHub.m 96.487% <100.000%> (+0.008%) ⬆️
Sources/Sentry/SentryReplayApi.m 62.068% <100.000%> (+5.206%) ⬆️
Sources/Sentry/SentrySDKInternal.m 84.188% <100.000%> (-0.201%) ⬇️
Sources/Sentry/SentrySwizzleWrapperHelper.m 100.000% <100.000%> (ø)
Sources/Swift/Core/Integrations/Integrations.swift 100.000% <100.000%> (ø)
...rations/Performance/SentryDisplayLinkWrapper.swift 100.000% <ø> (ø)
...tegrations/SessionReplay/SentrySessionReplay.swift 88.412% <ø> (ø)
... and 4 more

... and 8 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7714225...24e2fa5. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 29, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1206.20 ms 1240.54 ms 34.34 ms
Size 24.14 KiB 1.08 MiB 1.06 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
5807865 1230.73 ms 1259.50 ms 28.77 ms
50e7b3e 1221.54 ms 1250.81 ms 29.27 ms
bed2eb7 1215.88 ms 1247.14 ms 31.27 ms
2b4e787 1226.06 ms 1258.65 ms 32.59 ms
013fd4d 1216.02 ms 1242.16 ms 26.14 ms
29f846e 1210.51 ms 1238.66 ms 28.15 ms
79e2bb8 1216.37 ms 1242.42 ms 26.05 ms
83bf9af 1213.30 ms 1234.18 ms 20.89 ms
2e5230b 1207.41 ms 1240.41 ms 33.00 ms
1357911 1222.84 ms 1258.38 ms 35.54 ms

App size

Revision Plain With Sentry Diff
5807865 24.14 KiB 1.06 MiB 1.04 MiB
50e7b3e 24.14 KiB 1.04 MiB 1.02 MiB
bed2eb7 24.14 KiB 1.07 MiB 1.04 MiB
2b4e787 24.14 KiB 1.07 MiB 1.04 MiB
013fd4d 24.14 KiB 1.04 MiB 1.02 MiB
29f846e 24.14 KiB 1.07 MiB 1.04 MiB
79e2bb8 24.14 KiB 1.04 MiB 1.02 MiB
83bf9af 24.14 KiB 1.04 MiB 1.02 MiB
2e5230b 24.14 KiB 1.04 MiB 1.02 MiB
1357911 24.14 KiB 1.07 MiB 1.04 MiB

Previous results on branch: itay/cocoa-996-refactor-sentrysessionreplayintegrationm-in-swift

Startup times

Revision Plain With Sentry Diff
37cd8e6 1225.06 ms 1248.35 ms 23.29 ms
a4bbd41 1205.02 ms 1246.15 ms 41.13 ms
f74dca9 1223.67 ms 1260.06 ms 36.39 ms
7b14837 1221.20 ms 1256.64 ms 35.44 ms
102508e 1218.58 ms 1251.80 ms 33.22 ms
2a4fef7 1217.58 ms 1249.29 ms 31.71 ms
00ba50a 1224.80 ms 1257.04 ms 32.24 ms
455600e 1214.37 ms 1249.60 ms 35.22 ms
945e4e8 1224.23 ms 1255.27 ms 31.04 ms
542b03c 1216.48 ms 1247.83 ms 31.35 ms

App size

Revision Plain With Sentry Diff
37cd8e6 24.14 KiB 1.04 MiB 1.02 MiB
a4bbd41 24.14 KiB 1.04 MiB 1.02 MiB
f74dca9 24.14 KiB 1.08 MiB 1.06 MiB
7b14837 24.14 KiB 1.08 MiB 1.06 MiB
102508e 24.14 KiB 1.04 MiB 1.02 MiB
2a4fef7 24.14 KiB 1.05 MiB 1.03 MiB
00ba50a 24.14 KiB 1.04 MiB 1.02 MiB
455600e 24.14 KiB 1.08 MiB 1.06 MiB
945e4e8 24.14 KiB 1.05 MiB 1.03 MiB
542b03c 24.14 KiB 1.04 MiB 1.02 MiB

@itaybre itaybre marked this pull request as ready for review December 30, 2025 17:57
Copy link
Member

@philprime philprime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, we are getting there. Left some feedback.

@itaybre itaybre marked this pull request as draft January 13, 2026 22:01
@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • Prevent deadlock in SentryReachability by notifying observers outside the lock by itaybre in #7246

Internal Changes 🔧

  • (release) Fix changelog-preview permissions by BYK in #7262
  • Convert SentrySessionReplayIntegration to Swift by itaybre in #7102
  • Fix incomplete comment by itaybre in #7239

Other

  • test: Fix SentryDestinationTests to handle array type for tags by itaybre in #7240

🤖 This preview updates automatically when you update the PR.

@itaybre itaybre marked this pull request as ready for review January 22, 2026 19:31
@philprime
Copy link
Member

@itaybre please update the PR, it shows a lot of unrelated changes in the review UI.

Copy link
Member

@philprime philprime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for tackling this

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@itaybre itaybre enabled auto-merge (squash) January 23, 2026 14:40
@itaybre itaybre merged commit b8fcca6 into main Jan 23, 2026
200 checks passed
@itaybre itaybre deleted the itay/cocoa-996-refactor-sentrysessionreplayintegrationm-in-swift branch January 23, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: Convert SentrySessionReplayIntegration to Swift

3 participants

Comments